package com.yc.study.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yc.study.entity.Answer;
import com.yc.study.mapper.AnswerMapper;
import com.yc.study.service.IAnswerService;
import com.yc.study.vo.AnswerVo;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * 服务实现类
 *
 * @author 王妍
 * @since 2022-02-20
 */
@Service
@AllArgsConstructor
public class AnswerServiceImpl extends ServiceImpl<AnswerMapper, Answer> implements IAnswerService {
  private final AnswerMapper answerMapper;

  @Override
  public Page<AnswerVo> loadPageVoByStudentId(Page<AnswerVo> answerVoPage, AnswerVo answerVo) {
    return answerMapper.loadPageVo(answerVoPage, answerVo);
  }

  @Override
  public Page<AnswerVo> loadPageVoByTeacherId(Page<AnswerVo> answerVoPage, AnswerVo answerVo) {
    return answerMapper.loadPageVo(answerVoPage, answerVo);
  }
}
